package com.cloudfun.campusshare.entity;

import com.cloudfun.campusshare.common.constant.MerchantRegisterStatus;
import com.cloudfun.campusshare.common.constant.RegisterType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.annotations.GenericGenerator;

import javax.persistence.*;

/**
 * @author : zhangyongjie
 * @version : 1.0
 * @createTime : 2021/3/25 17:24
 * @description : 商户进件
 */

@Data
@Entity
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Table(name = "merchant_bank_register")
public class MerchantBankRegisterEntity extends BaseEntity{
    @Id
    @GenericGenerator(name = "id_uuid", strategy = "uuid")
    @GeneratedValue(generator = "id_uuid")
    @Column(name = "id", unique = true, columnDefinition = ("varchar(40) not null comment '主键uuid'"))
    private String id;

    @Column(name = "user_id", columnDefinition = ("varchar(40) not null comment '用户Id'"))
    private String userId;

    @Column(name = "trans_no", columnDefinition = ("varchar(40) default null comment '商户进件请求流水号'"))
    private String transNo;

    @Column(name = "batch_no", columnDefinition = ("varchar(40) default null comment '商户进件影像资料上传批次号'"))
    private String batchNo;

    @Column(name = "sub_merchant_no", columnDefinition = ("varchar(64) default null comment '慧收钱平台商户号'"))
    private String subMerchantNo;

    @Column(name = "register_type", columnDefinition = ("varchar(40) default null comment '进件类型'"))
    @Enumerated(EnumType.STRING)
    private RegisterType registerType;

    @Column(name = "order_status", columnDefinition = ("varchar(40) default null comment '订单状态'"))
    @Enumerated(EnumType.STRING)
    private MerchantRegisterStatus status;

    @Column(name = "merchant_name", columnDefinition = ("varchar(64) default null comment '商户全称'"))
    private String merchantName;

    @Column(name = "merchant_short_name", columnDefinition = ("varchar(64) default null comment '商户简称'"))
    private String merchantShortName;

    @Column(name = "service_phone", columnDefinition = ("varchar(64) default null comment '客服电话'"))
    private String servicePhone;

    @Column(name = "email", columnDefinition = ("varchar(64) default null comment '联系邮箱'"))
    private String email;

    @Column(name = "business_license", columnDefinition = ("varchar(64) default null comment '企业/个体证件编号'"))
    private String businessLicense;

    @Column(name = "province_code", columnDefinition = ("varchar(32) default null comment '省编码'"))
    private String provinceCode;

    @Column(name = "city_code", columnDefinition = ("varchar(32) default null comment '市编码'"))
    private String cityCode;

    @Column(name = "district_code", columnDefinition = ("varchar(32) default null comment '区编码'"))
    private String districtCode;

    @Column(name = "address", columnDefinition = ("varchar(64) default null comment '地址'"))
    private String address;

    @Column(name = "name", columnDefinition = ("varchar(32) default null comment '姓名（企业为法人姓名）'"))
    private String name;

    @Column(name = "phone", columnDefinition = ("varchar(11) default null comment '手机'"))
    private String phone;

    @Column(name = "cert_id", columnDefinition = ("varchar(32) default null comment '证件号码（企业为法人身份证号码）'"))
    private String certId;

    @Column(name = "bank_card_no", columnDefinition = ("varchar(32) not null comment '银行卡号'"))
    private String bankCardNo;

    @Column(name = "cnaps_no", columnDefinition = ("varchar(32) default null comment '开户行行号'"))
    private String cnapsNo;

    @Column(name = "result", columnDefinition = ("varchar(128) default null comment '结果'"))
    private String result;
}
